<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>
	组织添加修改
</title>
    <base target="_self" />
    <link href="Styles/ts_css.css" rel="stylesheet" type="text/css" /><link href="../Styles/css.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/jquery-1.4.1-vsdoc.js" type="text/javascript"></script>
    <script src="Scripts/jquery.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        $(function () {
            //必填项验证
            $("#isShows").hide();
            var typeval = $("#ddEmployeesType").find("option:selected").val();
            if (typeval == "1") {
                $("#isShows").show();
            }
            $("#btnSubmit").click(function () {
                var name = $("#txtName").val();
                if (name == "" || name == null) {
                    alert("请填写组织名称");
                    return false;
                }
                if (name.length > 50) {
                    alert("组织名称输入过长");
                    return false;
                }
                var typeval = $("#ddEmployeesType").find("option:selected").val();
                if (typeval == "1") {
                    var alias = $("#txtAlias").val();
                    if (alias == "" || alias == null) {
                        alert("广场编号不能为空");
                        return false;
                    }

                    var partten = /^[a-zA-Z]*$/;
                    if (!partten.exec(alias) || alias.length < 4) {
                        alert("广场编号格式不正确，只能输入4位英文字母");
                        return false;
                    }

                }
                var comment = $("#txtComment").val();
                if (comment.length > 0) {
                    if (comment.length > 1000) {
                        alert("备注输入超过有限长度,最多1000个字符");
                        return false;
                    }
                }
            });
            $("#ddEmployeesType").change(function () {
                var typeval = $("#ddEmployeesType").find("option:selected").val();
                if (typeval == "1") {
                    $("#txtAlias").val($("#hidAlias").val());
                    $("#isShows").show();
                } else {
                    $("#isShows").hide();
                }
            });
        });
        function page_Close() {
            if (window.parent != null) {
                window.parent.close();
            }
            else {
                window.close();
            }
        }
    </script>
</head>
 <form action="toAdd.do" method="post">
     	 客户编号:<input type="text" name="customerId" /><br/><br/>
     	 客户姓名:<input type="text" name="customerName" /><br/><br/>
     	 性&nbsp;&nbsp;别:<input type="radio" name="sex" value="男"  checked="checked"/> 男&nbsp;&nbsp;&nbsp; 
             <input type="radio" name="sex" value="女" /> 女 <br/><br/>
                      客户类型:<input type="radio" name="customerType" value="个人"  checked="checked"/> 个人&nbsp;&nbsp;&nbsp; 
             <input type="radio" name="customerType" value="公司" /> 公司 <br/><br/>
                      描&nbsp;&nbsp;述:<input type="text" name="describel"/><br/><br/>
                      婚姻状况:<input type="radio" name="maritalStatus" value="已婚"  checked="checked"/> 已婚&nbsp;&nbsp;&nbsp; 
             <input type="radio" name="maritalStatus" value="未婚" />未婚<br/><br/>
     	通讯地址:<input type="text" name="address"/><br/><br/>
     	<input type="submit" value="提交" />
     </form>
</html>


